package com.zy.web.demo.suanfa.fastRow;

import java.util.List;

/**
 * @author zy
 * @version 1.0
 * @date 2021/3/4 22:45
 * 快排
 */
public class FastRow {

    public static void main(String[] args) {

        int[] list = new int[]{1,9,2,3,8,12};

        for (int i = 0; i < list.length; i++) {
            for (int j = 0; j < list.length-1-i; j++) {
                if ( list[j] > list[j+1] ){
                    int i1 = list[j];
                    list[j] = list[j+1];
                    list[j+1] = i1;
                }
            }
        }

        for (int i : list) {
            System.out.println(i);
        }


    }

}
